package com.elective.courseselect.entity;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Set;

/**
 * 调查问卷，一条数据代表一题
 * 
 * @author lee
 * @email 943204006@qq.ccom
 * @date 2021-09-04 19:22:34
 */
@Data
@TableName("question")
public class QuestionEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@TableId(type = IdType.AUTO)
	private Integer id;
	/**
	 * 
	 */
	private Integer questionnaireId;
	/**
	 * 单选/多选/判断/主观
	 */
	private String type;
	/**
	 * questnaire_id 如果是调查问卷 就代表分值,如果是性格调查不启用
	 */
	private Integer value;
	/**
	 * 选项 单选/多选/判断时启用
	 */
	@TableField("`option`")
	private String option;
	/**
	 * 参考答案
	 */
	private String reference;
	/**
	 * 标签id
	 */
	private String charactersId;
	/**
	 * title
	 */
	private String title;

	/**
	 * 操作 0 新增 1 修改 2 删除
	 * 修改时调用
	 */
	@TableField(exist = false)
	private Integer operation;



	@TableField(exist = false)
	private JSONArray optionByJson;


	@TableField(exist = false)
	private JSONArray referenceByJson;

	@TableField(exist = false)
	private Set<String> charactersNames;
}
